#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main (void)
{
	pid_t pid = fork ();
	if (pid == -1) {
		perror ("fork()");
		return -1;
	}
	if (pid == 0) {
		//子进程执行的代码
		printf("child!\n");
	} else {
		//父进程执行的代码
		printf("parent!\n");
	}
	printf ("hehe!\n");
	getchar();
	return 0;
}
